#!/bin/bash
# XTU OJ: 1319
# Template
# by: fifth_light

cat << EOF
#define MOD 1000000007

#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>

int table[100050][2] = {0};
int divisors[65];

EOF
cat table-2.txt
cat << EOF

    int t;
    scanf("%d", &t);
    for(int i = 0; i < t; i++) {
        int n;
        scanf("%d", &n);
        int nums[DIVISOR_COUNT] = {0};
        for (int j = 0; j < n; j++) {
            int a;
            scanf("%d", &a);
            if (table[a][1] != 0) {
                nums[table[a][0]] += table[a][1];
            }
        }
        int64_t result = 1;
        for (int j = 0; j < DIVISOR_COUNT; j++) {
            result *= nums[j] + 1;
            result %= MOD;
        }
        printf("%" PRId64 "\n", result);
    }
    return 0;
}
EOF
